import request from "@/utils/request.js"

export const getEmpList = (query) => {
    return request({
        url: "/emps", 
        method: 'get',
        params: query
    })
}

export const deleteEmps = (ids) => {
    return request({
        url: `/emps`,
        method: 'delete',
        data: ids
    })
}

export const addEmp = (data) => {
    return request({
        url: '/emps',
        method: 'post',
        data: data
    })
}

export const getEmpById = (id) => {
    return request({
        url: `/emps/${id}`,
        method: 'get'
    })
}

export const updateEmp = (data) => {
    return request({
        url: '/emps',
        method: 'put',
        data: data
    }) 
}
